import request from '@/utils/request'

// 查询采购任务列表
export function listPurchtask(query) {
  return request({
    url: '/supply/purchtask/list',
    method: 'get',
    params: query
  })
}

// 查询采购任务详细
export function getPurchtask(id) {
  return request({
    url: '/supply/purchtask/' + id,
    method: 'get'
  })
}

// 新增采购任务
export function addPurchtask(data) {
  return request({
    url: '/supply/purchtask',
    method: 'post',
    data: data
  })
}

// 修改采购任务
export function updatePurchtask(data) {
  return request({
    url: '/supply/purchtask',
    method: 'put',
    data: data
  })
}

// 删除采购任务
export function delPurchtask(id) {
  return request({
    url: '/supply/purchtask/' + id,
    method: 'delete'
  })
}
